<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">	

<html>
<head>
<title>쇼핑몰 홈페이지</title>
<link rel="stylesheet" href="/resources/common/adminCommon.css">
<Script>
function go_new()
{
	location.href="OptionInsertForm";
}
</Script>
</head>

<body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<center>
<br>
<!-- 최상위 헤더의 메뉴 -->
<jsp:include page="../main_header.jsp" flush="true"/>

<table width="450" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td align="left"  width="250" height="50" valign="bottom">&nbsp 옵션수 : <font color="#FF0000">${optionAmount}</font></td>
		<td align="right" width="200" height="50" valign="bottom">
			<input type="button" value="신규입력" onclick="javascript:go_new()"> &nbsp
		</td>
	</tr>
	<tr><td height="5" colspan="2"></td></tr>
</table>

<table width="450" border="1" cellspacing="0" cellpadding="4"  bordercolordark="white" bordercolorlight="black">
	<tr bgcolor="#CCCCCC" height="20"> 
		<th width="50"  align="center"><font color="#142712">번호</font></td>
		<th width="200" align="center"><font color="#142712">옵션명</font></td>
		<th width="100" align="center"><font color="#142712">수정/삭제</font></td>
		<th width="100" align="center"><font color="#142712">소옵션편집</font></td>
	</tr>
		
	<c:forEach items="${optionList}" var="option" >
		<tr bgcolor="#F2F2F2" height="20">
			<td width="50"  align="center">${option.no}</td>
			<td width="200" align="left">${option.name}</td>
			<td width="100" align="center">
				<a href="OptionEditForm?no=${option.no}">수정</a>/
				<a href="OptionDelete?no=${option.no}" onclick="javascript:return confirm('삭제할까요 ?');">삭제</a>
			</td>
			<td width="100" align="center"><a href="OptionDetailListForm?no=${option.no}">소옵션편집</a></td>
		</tr>
	</c:forEach>	
</table>

<br>
</center>

</body>
</html>